/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ai;

/**
 *
 * @author root
 */
public class LabelExp extends LexExp {
    public LabelExp(){
        
    }
    public LabelExp(String pName) {
        mName = pName;
    }
    
    public String getName() {
        return mName;
    }
    public void setName(String pName){
        mName = pName;
    }
    public LexExp substitute(String pLabelName, String pString){
        if (mName.equals(pLabelName)) {
            return new StringExp(pString);
        }
        else {
            return this;
        }
    }
    
    public String toString(){
        return mName;
    }
    
    private String mName;
}
